const openID = require('openID')
exports.main = async (event, context) => {
    const { code } = event
	// 获取openID
	const res = await openID(code)
	
	if(res.status === 200){
		const wx_openid = res.data.openid
		
		return wx_openid
	}else{
		return res
	}
}